<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>公司信息修改页面</title>
<!-- 导入jquery核心类库 -->
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script>
<!-- 导入easyui类库 -->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/easyui/ext/portal.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/default.css">	
<script type="text/javascript" src="${pageContext.request.contextPath }/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/easyui/ext/jquery.portal.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/easyui/ext/jquery.cookie.js"></script>
<script	src="${pageContext.request.contextPath }/js/easyui/locale/easyui-lang-zh_CN.js"	type="text/javascript"></script>

</head>
<body class="easyui-layout">
<div data-options="region:'north'">
	<div class="datagrid-toolbar">
		<a id="save" icon="icon-save" href="#" class="easyui-linkbutton" plain="true">保存</a>
	</div>
	<script type="text/javascript">
	$(function(){
		$('#save').click(function(){
			//有效性验证
			if(!$('#companyEditForm').form('validate')){
				$.messager.alert('提示','表单还未填写完成!');
				return ;
			}
		
			$.post("${pageContext.request.contextPath }/admin/company/updatecompany.do",$("#companyEditForm").serialize(), function(data){
				if(data.status == 200){
					 //刷新当前页面.
					 $.messager.alert('提示', data.data, 'info', function() {
							$("#companyEditWindow").window('close');
							$("#companyList").datagrid("reload");
					});
				}else{
					//刷新当前页面.
					 $.messager.alert('提示', data.data, 'info', function() {
							$("#companyEditWindow").window('close');
							$("#companyList").datagrid("reload");
					});
					
					
				}
			},'json');
		});
	});
	</script>
</div>
<div data-options="region:'center'">
	<form id="companyEditForm" method="post">
		<input type="hidden" name="id" />
		<table class="table-edit" width="100%" align="center">
			<tr class="title">
				<td colspan="2">公司集团信息</td>
			</tr>
			<tr>
				<td>公司名称:</td>
				<td><input type="text" name="name" class="easyui-validatebox" data-options="required:true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td width="200">公司简介:</td>
				<td>
					<textarea  rows="5" name="about" class="textarea easyui-validatebox" required="true" style="height:200px;width: 80%;"></textarea>						
				</td>
			</tr>
			<tr>
        		<td>电话:</td><td><input type="text" name="grouptel" id="grouptel" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td>集团客服电话：</td>
        		<td>
        			<input type="text" name="groupservicetel" id="groupservicetel" class="easyui-validatebox" required="true" style="width: 80%"/>
        		</td>
			</tr>
			<tr>
        		<td>俱乐部邮箱:</td><td><input type="text" name="advertiseemail" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td>集团总部地址：</td>
        		<td>
        			<input type="text" name="groupaddress" id="groupaddress" class="easyui-validatebox" required="true" style="width: 80%"/>
        		</td>
			</tr>
			<tr>
        		<td>版权:</td><td><input type="text" name="copyright" id="copyright" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td>备案信息：</td>
        		<td>
        			<input type="text" name="record" id="record" class="easyui-validatebox" style="width: 80%"/>
        		</td>
			</tr>
			<tr>
        		<td>微信公众号:</td><td><input type="text" name="ext1" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
        		<td>俱乐部网站:</td><td><input type="text" name="ext2" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
        		<td>传媒网址:</td><td><input type="text" name="ext3" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
        		<td>集团网站:</td><td><input type="text" name="ext4" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
        		<td>集团总部:</td><td><input type="text" name="ext5" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>